<template>
    <div class="new-backup">
      <h2>新建备份</h2>
      <el-form :model="newBackupForm" label-width="100px">
        <el-form-item label="备份类型">
          <el-radio-group v-model="newBackupForm.type">
            <el-radio label="Full">全量备份</el-radio>
            <el-radio label="Incremental">增量备份</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备份文件格式">
          <el-radio-group v-model="newBackupForm.format">
            <el-radio label="RDB">RDB</el-radio>
            <el-radio label="AOF">AOF</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备份目标">
          <el-radio-group v-model="newBackupForm.target">
            <el-radio label="Local">本地存储</el-radio>
            <el-radio label="Remote">远程存储</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备份策略">
          <el-radio-group v-model="newBackupForm.strategy">
            <el-radio label="Scheduled">定时备份</el-radio>
            <el-radio label="Triggered">触发备份</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="handleSubmitNewBackup">提交</el-button>
        </el-form-item>
      </el-form>
    </div>
  </template>
  
  <script setup lang="ts">
  import { ref } from 'vue';
  
  const newBackupForm = ref({
    type: 'Full',
    format: 'RDB',
    target: 'Local',
    strategy: 'Scheduled',
  });
  
  const handleSubmitNewBackup = () => {
    alert('新建备份提交');
  };
  </script>